<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
request.setCharacterEncoding("UTF-8");
String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="<%=basePath%>">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link rel="stylesheet" type="text/css"	href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>admin/assets/jquery-easyui-1.4.3/themes/icon.css">
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>admin/assets/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="<%=basePath %>admin/assets/css/backOffice/myeasyui_base.css" type="text/css"></link>
<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/assets/css/backOffice/newsStyle.css">

<style type="text/css">

#tinybox{position:absolute; display:none; padding:10px; background:#ffffff url(image/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000;}
#tinymask{position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000000; z-index:1500;}
#tinycontent{background:#ffffff; font-size:1.1em;}


</style>
<body>
    <div class="topTitle">
    	Banner图管理
    </div>
    
    <!-- Begin 报告管理面板 -->
 	<div id="main_layout" class="easyui-layout">
	    <div data-options="region:'center',title:'Banner图管理'" style="padding:5px;background:#eee;">
	    	<table class="easyui-datagrid"  id="Banner" 
				data-options="rownumbers:true,singleSelect:false,url:'admin/banner/banner_getBannerJson.action',method:'get',toolbar:'#btn_banner',checkOnSelect: true,pageSize: '20',pageList: [20, 30, 40, 50, 100],pagination:true,fit:true" >
			
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'bannerId',width:100,hidden:true">编号</th>
					<th data-options="field:'bannerName',fit:'true',align:'left'">图片名称</th>
					<th data-options="field:'bannerSize',width:90,align:'center'">尺寸</th>
					<th data-options="field:'filePath',fit:'true',align:'center'"formatter="showImgFormatter">显示图片</th>
					<th data-options="field:'bannerOrder',fit:'true',align:'center'">排序</th>
					<th data-options="field:'bannerStatus',width:70,align:'center'"formatter="displayStatusFormatter">显示状态</th>
					<th data-options="field:'addTime',width:150,align:'center'"formatter="dateHHmmssFormatter">上传时间</th>
				</tr>
			</thead>
		</table>
		
    </div>
</div>
	<!-- End 报告管理面板 -->
    
     <!-- Begin 菜单详情操作按钮 -->
    <div id="btn_banner" style="height:auto">
    	<div style="margin-bottom:5px">
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-map_add',plain:true" onclick="addBanner()">上传图片</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="updateBanner()">修改</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeBanner()">删除</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-play_green',plain:true" onclick="show()">显示</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-pause_green',plain:true" onclick="hide()">不显示</a>
		</div>
		<div>
			<table style="font-size: 13">
				<tr>
					<td style="text-align: right;">
						图片名称： 
					</td>
					<td>
						<input class="easyui-textbox" id="search_bannerName"  data-options="" style="width:150px"></input>
					</td>
					<td class="align_right_100">
						显示状态： 
					</td>
					<td>
						<select class="easyui-combobox"  id="search_status"   panelHeight="auto" style="width:150px" >
							<option value="">==请选择==</option>
							<option value="1">显示</option>
							<option value="0">隐藏</option>
						</select>
					</td>
					<td class="align_right_100">
						<a class="easyui-linkbutton" iconCls="icon-search" onclick="searchBanner()">查询</a>
					</td>
				</tr>
			</table>
			<br>
		</div>
	</div>
    <!-- End 菜单详情操作按钮 -->

    <!-- Begin 上传详情 -->
	<div id="update_dialog" class="easyui-dialog"  style="padding:10px" data-options="modal:true,closed:true,resizable:true,shadow:false">
    	<div>上传Banner图</div><span>（请上传尺寸为1920*738大小的banner图）</span>
    	<form id="banner_form" method="post" enctype="multipart/form-data">
	    	<input type="hidden" id="form_bannerId" name="banner.bannerId" />
		    <table style="width: 350px" align="center" style="font-size: 13">
				<tr>
	    			<td  class="updatePage_75">图片名称：</td>
	    			<td>
	    				<input  class="easyui-textbox" name="banner.bannerName" id="form_bannerName"  data-options="validType:'length[1,50]'" style="width:150px" required="true"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td  class="updatePage_75">图片序号：</td>
	    			<td>
	    				<input  class="easyui-numberbox" name="banner.bannerOrder" id="form_bannerOrder"  data-options="min:0,max:999" style="width:150px" required="true"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td  class="updatePage_75">上传图片：</td>
	    			<td><input type="file" name="bannerImg" id="form_imgURL" /></td>
	    		</tr>
	    	</table>
	    </form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" id="from_submit" onclick="submitDataForm()">提交</a>
	    </div>
	</div>
	<!-- End 上传详情 -->
    
	<script type="text/javascript" src="<%=basePath %>admin/assets/js/BackOffice/mine-function.js"></script>
	<script type="text/javascript" src="<%=basePath %>admin/youbiao/news/js/tinybox.js"></script>
	<script type="text/javascript" src="<%=basePath %>admin/youbiao/banner/js/js_banner.js"></script>
	<script type="text/javascript">
		function tanchupic(src){
			var content = "<img width='auto' height='500' src='"+src+"' />";//弹出图片
		    TINY.box.show(content,0,0,0,0);
		   }
	</script>
</body>
</html>
